home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 61 67 | 65 2e 63 6f 6d 21 6e 65 |Path: ag|e.com!ne|
|00000010| 77 73 0a 46 72 6f 6d 3a | 20 54 6f 6d 20 42 72 6f |ws.From:| Tom Bro|
|00000020| 77 6e 20 3c 74 77 62 40 | 6e 65 74 6d 61 6e 61 67 |wn <twb@|netmanag|
|00000030| 65 2e 63 6f 6d 3e 0a 4e | 65 77 73 67 72 6f 75 70 |e.com>.N|ewsgroup|
|00000040| 73 3a 20 63 6f 6d 70 2e | 6f 73 2e 6d 73 2d 77 69 |s: comp.|os.ms-wi|
|00000050| 6e 64 6f 77 73 2e 70 72 | 6f 67 72 61 6d 6d 65 72 |ndows.pr|ogrammer|
|00000060| 2e 77 69 6e 33 32 2c 63 | 6f 6d 70 2e 6c 61 6e 67 |.win32,c|omp.lang|
|00000070| 2e 63 2b 2b 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |.c++.Sub|ject: Re|
|00000080| 3a 20 53 6f 63 6b 65 74 | 73 20 64 6f 6e 27 74 20 |: Socket|s don't |
|00000090| 77 6f 72 6b 20 75 6e 64 | 65 72 20 56 43 2b 2b 20 |work und|er VC++ |
|000000a0| 34 2e 30 20 3f 21 21 0a | 44 61 74 65 3a 20 54 75 |4.0 ?!!.|Date: Tu|
|000000b0| 65 2c 20 31 36 20 4a 61 | 6e 20 39 36 20 31 30 3a |e, 16 Ja|n 96 10:|
|000000c0| 33 31 3a 32 30 20 50 44 | 54 0a 4f 72 67 61 6e 69 |31:20 PD|T.Organi|
|000000d0| 7a 61 74 69 6f 6e 3a 20 | 41 47 45 20 4c 6f 67 69 |zation: |AGE Logi|
|000000e0| 63 73 2c 20 49 6e 63 2e | 2c 20 53 61 6e 20 44 69 |cs, Inc.|, San Di|
|000000f0| 65 67 6f 20 43 41 0a 4d | 65 73 73 61 67 65 2d 49 |ego CA.M|essage-I|
|00000100| 44 3a 20 3c 4e 45 57 54 | 4e 65 77 73 2e 38 32 31 |D: <NEWT|News.821|
|00000110| 38 31 38 31 35 37 2e 36 | 37 32 32 2e 74 77 62 40 |818157.6|722.twb@|
|00000120| 62 72 6f 77 6e 73 5f 74 | 6f 6f 2e 61 67 65 2e 63 |browns_t|oo.age.c|
|00000130| 6f 6d 3e 0a 52 65 66 65 | 72 65 6e 63 65 73 3a 20 |om>.Refe|rences: |
|00000140| 3c 33 30 46 38 41 38 42 | 39 2e 32 37 39 42 40 6d |<30F8A8B|9.279B@m|
|00000150| 65 74 72 6f 6e 65 74 2e | 63 6f 6d 3e 0a 4e 4e 54 |etronet.|com>.NNT|
|00000160| 50 2d 50 6f 73 74 69 6e | 67 2d 48 6f 73 74 3a 20 |P-Postin|g-Host: |
|00000170| 62 72 6f 77 6e 73 5f 74 | 6f 6f 2e 61 67 65 2e 63 |browns_t|oo.age.c|
|00000180| 6f 6d 0a 4d 69 6d 65 2d | 56 65 72 73 69 6f 6e 3a |om.Mime-|Version:|
|00000190| 20 31 2e 30 0a 43 6f 6e | 74 65 6e 74 2d 54 79 70 | 1.0.Con|tent-Typ|
|000001a0| 65 3a 20 54 45 58 54 2f | 50 4c 41 49 4e 3b 20 63 |e: TEXT/|PLAIN; c|
|000001b0| 68 61 72 73 65 74 3d 55 | 53 2d 41 53 43 49 49 0a |harset=U|S-ASCII.|
|000001c0| 54 6f 3a 20 67 61 76 69 | 6e 40 6d 65 74 72 6f 6e |To: gavi|n@metron|
|000001d0| 65 74 2e 63 6f 6d 0a 58 | 2d 4e 65 77 73 72 65 61 |et.com.X|-Newsrea|
|000001e0| 64 65 72 3a 20 4e 45 57 | 54 4e 65 77 73 20 26 20 |der: NEW|TNews & |
|000001f0| 43 68 61 6d 65 6c 65 6f | 6e 20 2d 2d 20 54 43 50 |Chameleo|n -- TCP|
|00000200| 2f 49 50 20 66 6f 72 20 | 4d 53 20 57 69 6e 64 6f |/IP for |MS Windo|
|00000210| 77 73 20 66 72 6f 6d 20 | 4e 65 74 4d 61 6e 61 67 |ws from |NetManag|
|00000220| 65 0a 0a 0a 49 6e 20 41 | 72 74 69 63 6c 65 3c 33 |e...In A|rticle<3|
|00000230| 30 46 38 41 38 42 39 2e | 32 37 39 42 40 6d 65 74 |0F8A8B9.|279B@met|
|00000240| 72 6f 6e 65 74 2e 63 6f | 6d 3e 2c 20 3c 67 61 76 |ronet.co|m>, <gav|
|00000250| 69 6e 40 6d 65 74 72 6f | 6e 65 74 2e 63 6f 6d 3e |in@metro|net.com>|
|00000260| 20 77 72 69 74 65 73 3a | 0a 3e 20 49 20 66 69 6e | writes:|.> I fin|
|00000270| 61 6c 6c 79 20 67 6f 74 | 20 61 72 6f 75 6e 64 20 |ally got| around |
|00000280| 74 6f 20 64 6f 69 6e 67 | 20 61 20 6c 69 74 74 6c |to doing| a littl|
|00000290| 65 20 57 69 6e 64 6f 77 | 73 20 53 6f 63 6b 65 74 |e Window|s Socket|
|000002a0| 73 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 69 6e |s progra|mming in|
|000002b0| 20 56 43 2b 2b 20 0a 3e | 20 34 2e 30 20 74 6f 64 | VC++ .>| 4.0 tod|
|000002c0| 61 79 20 61 6e 64 20 77 | 61 73 20 71 75 69 63 6b |ay and w|as quick|
|000002d0| 6c 79 20 67 72 65 65 74 | 65 64 20 77 69 74 68 20 |ly greet|ed with |
|000002e0| 61 6e 20 75 67 6c 79 20 | 70 72 6f 62 6c 65 6d 2d |an ugly |problem-|
|000002f0| 2d 49 20 63 61 6e 27 74 | 20 67 65 74 20 69 74 20 |-I can't| get it |
|00000300| 74 6f 20 0a 3e 20 63 72 | 65 61 74 65 20 61 20 73 |to .> cr|eate a s|
|00000310| 6f 63 6b 65 74 2e 0a 3e | 20 0a 3e 20 54 68 65 20 |ocket..>| .> The |
|00000320| 43 53 6f 63 6b 65 74 3a | 3a 43 72 65 61 74 65 28 |CSocket:|:Create(|
|00000330| 29 20 66 75 6e 63 74 69 | 6f 6e 20 63 6f 6e 73 69 |) functi|on consi|
|00000340| 73 74 65 6e 74 6c 79 20 | 66 61 69 6c 65 64 2c 20 |stently |failed, |
|00000350| 61 6e 64 20 0a 3e 20 43 | 53 6f 63 6b 65 74 3a 3a |and .> C|Socket::|
|00000360| 47 65 74 4c 61 73 74 45 | 72 72 6f 72 28 29 20 72 |GetLastE|rror() r|
|00000370| 65 74 75 72 6e 65 64 20 | 57 53 41 45 50 52 4f 54 |eturned |WSAEPROT|
|00000380| 4f 54 59 50 45 2e 20 49 | 20 74 72 69 65 64 20 72 |OTYPE. I| tried r|
|00000390| 75 6e 6e 69 6e 67 20 74 | 68 65 20 43 48 41 54 54 |unning t|he CHATT|
|000003a0| 45 52 20 0a 3e 20 73 61 | 6d 70 6c 65 20 70 72 6f |ER .> sa|mple pro|
|000003b0| 67 72 61 6d 2c 20 61 6e | 64 20 69 74 73 20 73 6f |gram, an|d its so|
|000003c0| 63 6b 65 74 20 63 72 65 | 61 74 69 6f 6e 20 66 61 |cket cre|ation fa|
|000003d0| 69 6c 65 64 20 77 69 74 | 68 20 74 68 65 20 73 61 |iled wit|h the sa|
|000003e0| 6d 65 20 65 72 72 6f 72 | 2e 0a 3e 20 0a 3e 20 54 |me error|..> .> T|
|000003f0| 68 65 6e 20 49 20 74 72 | 69 65 64 20 74 72 69 65 |hen I tr|ied trie|
|00000400| 64 20 73 74 72 61 69 67 | 68 74 20 73 6f 63 6b 65 |d straig|ht socke|
|00000410| 74 20 41 50 49 20 63 61 | 6c 6c 73 20 28 61 73 20 |t API ca|lls (as |
|00000420| 6f 70 70 6f 73 65 64 20 | 74 6f 20 75 73 69 6e 67 |opposed |to using|
|00000430| 20 74 68 65 20 0a 43 53 | 6f 63 6b 65 74 20 0a 3e | the .CS|ocket .>|
|00000440| 20 6f 72 20 43 41 73 79 | 6e 63 53 6f 63 6b 65 74 | or CAsy|ncSocket|
|00000450| 20 63 6c 61 73 73 65 73 | 29 2e 20 54 68 65 20 22 | classes|). The "|
|00000460| 73 6f 63 6b 65 74 22 20 | 66 75 6e 63 74 69 6f 6e |socket" |function|
|00000470| 20 61 6c 73 6f 20 66 61 | 69 6c 65 64 20 77 69 74 | also fa|iled wit|
|00000480| 68 20 74 68 65 20 0a 3e | 20 57 53 41 45 50 52 4f |h the .>| WSAEPRO|
|00000490| 54 4f 54 59 50 45 20 65 | 72 72 6f 72 2e 0a 3e 20 |TOTYPE e|rror..> |
|000004a0| 0a 3e 20 46 69 6e 61 6c | 6c 79 2c 20 49 20 74 72 |.> Final|ly, I tr|
|000004b0| 69 65 64 20 73 6f 6d 65 | 20 73 69 6d 70 6c 65 20 |ied some| simple |
|000004c0| 73 6f 63 6b 65 74 73 20 | 63 6f 64 65 20 69 6e 20 |sockets |code in |
|000004d0| 56 43 2b 2b 20 31 2e 35 | 32 63 20 61 6e 64 20 56 |VC++ 1.5|2c and V|
|000004e0| 43 2b 2b 20 32 2e 32 2e | 20 54 68 65 20 0a 3e 20 |C++ 2.2.| The .> |
|000004f0| 63 6f 64 65 20 2a 77 6f | 72 6b 65 64 2a 20 69 6e |code *wo|rked* in|
|00000500| 20 62 6f 74 68 20 63 61 | 73 65 73 2e 20 54 68 65 | both ca|ses. The|
|00000510| 20 2a 65 78 61 63 74 20 | 73 61 6d 65 20 63 6f 64 | *exact |same cod|
|00000520| 65 2a 20 77 6f 72 6b 73 | 20 66 69 6e 65 20 77 68 |e* works| fine wh|
|00000530| 65 6e 20 63 6f 6d 70 69 | 6c 65 64 20 0a 3e 20 77 |en compi|led .> w|
|00000540| 69 74 68 20 32 2e 32 20 | 62 75 74 20 66 61 69 6c |ith 2.2 |but fail|
|00000550| 73 20 77 68 65 6e 20 63 | 6f 6d 70 69 6c 65 64 20 |s when c|ompiled |
|00000560| 77 69 74 68 20 34 2e 30 | 2e 0a 3e 20 0a 3e 20 48 |with 4.0|..> .> H|
|00000570| 65 72 65 27 73 20 61 20 | 73 61 6d 70 6c 65 20 6f |ere's a |sample o|
|00000580| 66 20 6d 79 20 74 65 73 | 74 20 63 6f 64 65 3a 0a |f my tes|t code:.|
|00000590| 3e 20 0a 3e 20 20 20 57 | 53 41 44 41 54 41 20 77 |> .> W|SADATA w|
|000005a0| 73 61 64 61 74 61 3b 0a | 3e 20 20 20 57 53 41 53 |sadata;.|> WSAS|
|000005b0| 74 61 72 74 75 70 28 20 | 30 78 30 31 30 31 2c 20 |tartup( |0x0101, |
|000005c0| 26 77 73 61 64 61 74 61 | 20 29 3b 0a 3e 20 0a 3e |&wsadata| );.> .>|
|000005d0| 20 20 20 53 4f 43 4b 45 | 54 20 73 6f 63 6b 3b 0a | SOCKE|T sock;.|
|000005e0| 3e 20 20 20 69 66 28 20 | 49 4e 56 41 4c 49 44 5f |> if( |INVALID_|
|000005f0| 53 4f 43 4b 45 54 20 3d | 3d 20 28 73 6f 63 6b 20 |SOCKET =|= (sock |
|00000600| 3d 20 73 6f 63 6b 65 74 | 28 20 50 46 5f 49 4e 45 |= socket|( PF_INE|
|00000610| 54 2c 20 53 4f 43 4b 5f | 53 54 52 45 41 4d 2c 20 |T, SOCK_|STREAM, |
|00000620| 30 20 29 29 20 29 0a 3e | 20 09 7b 0a 3e 20 09 69 |0 )) ).>| .{.> .i|
|00000630| 6e 74 20 69 20 3d 20 57 | 53 41 47 65 74 4c 61 73 |nt i = W|SAGetLas|
|00000640| 74 45 72 72 6f 72 28 29 | 3b 0a 3e 20 09 7d 0a 3e |tError()|;.> .}.>|
|00000650| 20 0a 3e 20 20 20 57 53 | 41 43 6c 65 61 6e 75 70 | .> WS|ACleanup|
|00000660| 28 29 3b 0a 0a 48 6d 6d | 6d 2e 2e 2e 20 73 74 72 |();..Hmm|m... str|
|00000670| 61 6e 67 65 21 0a 0a 46 | 69 72 73 74 20 6f 66 20 |ange!..F|irst of |
|00000680| 61 6c 6c 2c 20 74 65 73 | 74 20 74 68 65 20 72 65 |all, tes|t the re|
|00000690| 74 75 72 6e 20 76 61 6c | 75 65 20 66 72 6f 6d 20 |turn val|ue from |
|000006a0| 57 53 41 53 74 61 72 74 | 75 70 2c 20 6d 61 6b 65 |WSAStart|up, make|
|000006b0| 20 73 75 72 65 20 69 74 | 20 69 73 20 0a 73 75 63 | sure it| is .suc|
|000006c0| 63 65 65 64 69 6e 67 21 | 0a 0a 49 66 20 73 6f 20 |ceeding!|..If so |
|000006d0| 74 68 65 6e 20 74 72 79 | 20 74 68 69 73 20 73 6f |then try| this so|
|000006e0| 63 6b 65 74 20 63 61 6c | 6c 3a 0a 0a 09 73 6f 63 |cket cal|l:...soc|
|000006f0| 6b 20 3d 20 73 6f 63 6b | 65 74 28 41 46 5f 49 4e |k = sock|et(AF_IN|
|00000700| 45 54 2c 20 53 4f 43 4b | 5f 53 54 52 45 41 4d 2c |ET, SOCK|_STREAM,|
|00000710| 20 49 50 50 52 4f 54 4f | 5f 54 43 50 29 3b 0a 09 | IPPROTO|_TCP);..|
|00000720| 2e 2e 2e 0a 0a 54 68 69 | 73 20 73 68 6f 75 6c 64 |.....Thi|s should|
|00000730| 6e 27 74 20 62 65 20 73 | 75 62 73 74 61 6e 74 69 |n't be s|ubstanti|
|00000740| 61 6c 6c 79 20 64 69 66 | 66 65 72 65 6e 74 20 66 |ally dif|ferent f|
|00000750| 72 6f 6d 20 79 6f 75 72 | 20 63 61 6c 6c 2c 20 69 |rom your| call, i|
|00000760| 74 20 69 73 20 6a 75 73 | 74 20 6d 6f 72 65 20 0a |t is jus|t more .|
|00000770| 65 78 70 6c 69 63 69 74 | 2e 20 20 53 6f 6d 65 20 |explicit|. Some |
|00000780| 70 6f 69 6e 74 73 3a 0a | 0a 20 20 20 2d 20 54 68 |points:.|. - Th|
|00000790| 65 20 66 69 72 73 74 20 | 70 61 72 61 6d 65 74 65 |e first |paramete|
|000007a0| 72 20 74 6f 20 73 6f 63 | 6b 65 74 28 29 20 73 70 |r to soc|ket() sp|
|000007b0| 65 63 69 66 69 65 73 20 | 61 6e 20 61 64 64 72 65 |ecifies |an addre|
|000007c0| 73 73 20 66 61 6d 69 6c | 79 2c 20 6e 6f 74 20 61 |ss famil|y, not a|
|000007d0| 0a 20 20 20 20 20 70 72 | 6f 74 6f 63 6f 6c 20 66 |. pr|otocol f|
|000007e0| 61 6d 69 6c 79 20 73 6f | 20 74 68 65 20 75 73 65 |amily so| the use|
|000007f0| 20 6f 66 20 74 68 65 20 | 41 46 5f 20 63 6f 6e 73 | of the |AF_ cons|
|00000800| 74 61 6e 74 73 20 69 73 | 20 6d 6f 72 65 20 61 70 |tants is| more ap|
|00000810| 70 72 6f 70 72 69 61 74 | 65 2e 0a 20 20 20 20 20 |propriat|e.. |
|00000820| 54 68 65 20 68 65 61 64 | 65 72 20 66 69 6c 65 20 |The head|er file |
|00000830| 64 65 66 69 6e 65 73 20 | 74 68 65 20 50 46 5f 20 |defines |the PF_ |
|00000840| 61 6e 64 20 41 46 5f 20 | 76 61 6c 75 65 73 20 74 |and AF_ |values t|
|00000850| 6f 20 62 65 20 74 68 65 | 20 73 61 6d 65 2c 20 62 |o be the| same, b|
|00000860| 75 74 0a 20 20 20 20 20 | 79 6f 75 20 6e 65 76 65 |ut. |you neve|
|00000870| 72 20 6b 6e 6f 77 2e 2e | 2e 0a 0a 20 20 20 2d 20 |r know..|... - |
|00000880| 53 70 65 63 69 66 79 69 | 6e 67 20 61 20 73 70 65 |Specifyi|ng a spe|
|00000890| 63 69 66 69 63 20 70 72 | 6f 74 6f 63 6f 6c 20 28 |cific pr|otocol (|
|000008a0| 54 43 50 20 69 6e 20 74 | 68 69 73 20 63 61 73 65 |TCP in t|his case|
|000008b0| 29 20 6c 65 61 76 65 73 | 20 74 68 65 20 73 6f 63 |) leaves| the soc|
|000008c0| 6b 65 74 0a 20 20 20 20 | 20 6c 69 62 72 61 72 79 |ket. | library|
|000008d0| 20 6e 6f 20 6c 65 65 77 | 61 79 20 74 6f 20 6d 69 | no leew|ay to mi|
|000008e0| 73 69 6e 74 65 72 70 72 | 65 74 20 74 68 65 20 6b |sinterpr|et the k|
|000008f0| 69 6e 64 20 6f 66 20 73 | 6f 63 6b 65 74 20 79 6f |ind of s|ocket yo|
|00000900| 75 20 77 61 6e 74 2e 0a | 0a 4f 74 68 65 72 20 74 |u want..|.Other t|
|00000910| 68 61 6e 20 74 68 69 73 | 20 49 20 64 6f 20 6e 6f |han this| I do no|
|00000920| 74 20 6b 6e 6f 77 20 77 | 68 61 74 20 63 6f 75 6c |t know w|hat coul|
|00000930| 64 20 62 65 20 77 72 6f | 6e 67 2e 20 20 41 20 57 |d be wro|ng. A W|
|00000940| 53 41 45 50 52 4f 54 4f | 54 59 50 45 20 65 72 72 |SAEPROTO|TYPE err|
|00000950| 6f 72 20 0a 69 6e 64 69 | 63 61 74 65 73 20 28 61 |or .indi|cates (a|
|00000960| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 74 68 65 20 |ccording| to the |
|00000970| 73 70 65 63 29 20 74 68 | 61 74 20 74 68 65 20 53 |spec) th|at the S|
|00000980| 4f 43 4b 5f 53 54 52 45 | 41 4d 20 70 61 72 61 6d |OCK_STRE|AM param|
|00000990| 65 74 65 72 20 69 73 20 | 6e 6f 74 20 0a 61 76 61 |eter is |not .ava|
|000009a0| 69 6c 61 62 6c 65 20 66 | 6f 72 20 61 20 50 46 5f |ilable f|or a PF_|
|000009b0| 49 4e 45 54 20 28 41 46 | 5f 49 4e 45 54 29 20 61 |INET (AF|_INET) a|
|000009c0| 64 64 72 65 73 73 20 66 | 61 6d 69 6c 79 20 73 6f |ddress f|amily so|
|000009d0| 63 6b 65 74 20 77 68 69 | 63 68 20 63 6c 65 61 72 |cket whi|ch clear|
|000009e0| 6c 79 20 64 6f 65 73 20 | 6e 6f 74 20 0a 6d 61 6b |ly does |not .mak|
|000009f0| 65 20 73 65 6e 73 65 2e | 0a 0a 49 20 68 61 76 65 |e sense.|..I have|
|00000a00| 20 6e 6f 74 20 74 72 69 | 65 64 20 74 6f 20 75 73 | not tri|ed to us|
|00000a10| 65 20 34 2e 30 20 74 6f | 20 62 75 69 6c 64 20 73 |e 4.0 to| build s|
|00000a20| 6f 63 6b 65 74 20 61 70 | 70 73 20 79 65 74 20 73 |ocket ap|ps yet s|
|00000a30| 6f 20 63 61 6e 6e 6f 74 | 20 74 65 6c 6c 20 79 6f |o cannot| tell yo|
|00000a40| 75 20 74 68 61 74 20 0a | 69 74 20 61 62 73 6f 6c |u that .|it absol|
|00000a50| 75 74 65 6c 79 20 77 6f | 72 6b 73 2e 0a 0a 2d 2d |utely wo|rks...--|
|00000a60| 20 54 6f 6d 0a 20 20 20 | 74 77 62 40 6e 65 74 6d | Tom. |twb@netm|
|00000a70| 61 6e 61 67 65 2e 63 6f | 6d 0a 0a |anage.co|m.. |
+--------+-------------------------+-------------------------+--------+--------+